import { createStore, applyMiddleware } from 'redux';
import createSagaMiddleware from 'redux-saga';
import { reducers } from './reducter';
import rootSaga from './sage';

const sagaMiddleware = createSagaMiddleware();
const logger = require("redux-logger").default;

const store: any = createStore(
    reducers,
    applyMiddleware(sagaMiddleware, logger)
);

sagaMiddleware.run(rootSaga);
export default store;